home *** CD-ROM | disk | FTP | other *** search
/ Mac OS 9 Serial Number Archive / SN Archive 2023.11.04.toast / BSNG / SDK / BSNG SDK 2.6 / Contributed / Basic / Resources / Template / Template PPob Script.r < prev    next >
Encoding:
Text File  |  1998-08-22  |  5.6 KB  |  343 lines  |  [TEXT/CWIE]

  1. /* Template PPob Script.r */
  2. /* This is the engine of the PPob rez file.  It needs no editing. */
  3.  
  4. #include "PowerPlant.r"
  5.  
  6. #define FIELD_CAPTION \
  7.                 ObjectData { GACaption { \
  8.                         10000 + ID, \
  9.                         {88, 14}, \
  10.                         visible, enabled, \
  11.                         bound, bound,    unbound, unbound, \
  12.                         X, Y, \
  13.                         0, defaultSuperView, \
  14.                         TEXT, CAPTION_STYLE \
  15.                 } } 
  16.  
  17. #define FIELD_EDITFIELD \
  18.                 ObjectData { GAFocusBorder { \
  19.                         10100 + ID, \
  20.                         {166, 24}, \
  21.                         visible, enabled, \
  22.                         bound, bound,    unbound, unbound, \
  23.                         X, Y, \
  24.                         0, defaultSuperView, \
  25.                         0, 0, 0, 0, 1, 1, \
  26.                         noReconcileOverhang, \
  27.                         100000 + id, 100000 + id, \
  28.                         hasPaintFace,    noFrameInset,    noNotchInset, noNotchFace, \
  29.                         15,    hasCanFocus, noCurrentFocus \
  30.                 } }, \
  31.         BeginSubs {}, \
  32.                         ObjectData { GAEditField { \
  33.                                 100000 + id, \
  34.                                 {158, 16}, \
  35.                                 visible, enabled, \
  36.                                 bound, bound, unbound, unbound, \
  37.                                 4, 4, 0, defaultSuperView, \
  38.                                 TEXT, \
  39.                                 2001, \
  40.                                 MAX, hasBox, noWordWrap, hasAutoScroll, \
  41.                                 noTextBuffering, noOutlineHilite, \
  42.                                 noInlineInput, noTextServices, FILTER \
  43.                         } }, \
  44.         EndSubs {}
  45.  
  46. #define SEPARATOR \
  47.                 ObjectData { GASeparator { \
  48.                         10199, \
  49.                         {260, 4}, \
  50.                         visible, enabled, \
  51.                         bound, bound, unbound, unbound, \
  52.                         X, Y, \
  53.                         0, defaultSuperView \
  54.                 } }
  55.  
  56. #define FIELD_COUNT (ENTRY_COUNT + RESULT_COUNT)
  57.  
  58.  
  59. /* Generate the actual PPob */
  60.  
  61. resource 'PPob' (1000) {
  62.     {
  63.         ObjectData {
  64.             AbstractView {
  65.                 1000,
  66.                 {280, 264},
  67.                 visible, enabled,
  68.                 bound, bound, unbound, unbound,
  69.                 0, 0,
  70.                 0, defaultSuperView,
  71.                 280, 264,
  72.                 0, 0,
  73.                 16, 16,
  74.                 hasReconcileOverhang
  75.             }
  76.         },
  77.  
  78.         BeginSubs {},
  79.                 ObjectData { GACaption {
  80.                         10000,
  81.                         {260, 38},
  82.                         visible, enabled,
  83.                         bound, bound, unbound, unbound,
  84.                         10, 10,
  85.                         0, defaultSuperView,
  86.                         TOP_CAPTION, 2004
  87.                 } },
  88.  
  89.                 // BEGIN tab group --------
  90.                 ObjectData { TabGroup {} },
  91.                 BeginSubs {},
  92.  
  93. #define CAPTION_STYLE   2002
  94. #define SEPARATOR_EXTRA 0
  95.  
  96.  
  97. /* Field 1 */
  98.  
  99. #if ENTRY_COUNT < 1
  100.     #define CAPTION_STYLE     2001
  101.     #define SEPARATOR_EXTRA   18
  102.     #define FIELD_1_MAX_CHARS 0
  103.     #define FIELD_1_FILTER    noFilter
  104. #endif
  105.  
  106. #if FIELD_COUNT > 0
  107.  
  108.     #define ID   1
  109.     #define X    10
  110.     #define Y    (64 + SEPARATOR_EXTRA)
  111.     #define TEXT FIELD_1_TITLE
  112.  
  113.             FIELD_CAPTION,
  114.  
  115.     #define X      104
  116.     #define Y      (59 + SEPARATOR_EXTRA)
  117.     #define TEXT   FIELD_1_DEFAULT
  118.     #define MAX    FIELD_1_MAX_CHARS
  119.     #define FILTER FIELD_1_FILTER
  120.  
  121.                     FIELD_EDITFIELD,
  122.  
  123. #endif
  124.  
  125.  
  126.  
  127. /* Field 2 */
  128.  
  129. #if ENTRY_COUNT < 2
  130.     #define CAPTION_STYLE     2001
  131.     #define SEPARATOR_EXTRA   18
  132.     #define FIELD_2_MAX_CHARS 0
  133.     #define FIELD_2_FILTER    noFilter
  134. #endif
  135.  
  136. #if FIELD_COUNT > 1
  137.  
  138.     #define ID   2
  139.     #define X    10
  140.     #define Y    (93 + SEPARATOR_EXTRA)
  141.     #define TEXT FIELD_2_TITLE
  142.  
  143.             FIELD_CAPTION,
  144.  
  145.     #define X      104
  146.     #define Y      (88 + SEPARATOR_EXTRA)
  147.     #define TEXT   FIELD_2_DEFAULT
  148.     #define MAX    FIELD_2_MAX_CHARS
  149.     #define FILTER FIELD_2_FILTER
  150.  
  151.                     FIELD_EDITFIELD,
  152.  
  153. #endif
  154.  
  155.  
  156.  
  157. /* Field 3 */
  158.  
  159. #if ENTRY_COUNT < 3
  160.     #define CAPTION_STYLE     2001
  161.     #define SEPARATOR_EXTRA   18
  162.     #define FIELD_3_MAX_CHARS 0
  163.     #define FIELD_3_FILTER    noFilter
  164. #endif
  165.  
  166. #if FIELD_COUNT > 2
  167.  
  168.     #define ID   3
  169.     #define X    10
  170.     #define Y    (122 + SEPARATOR_EXTRA)
  171.     #define TEXT FIELD_3_TITLE
  172.  
  173.             FIELD_CAPTION,
  174.  
  175.     #define X      104
  176.     #define Y      (117 + SEPARATOR_EXTRA)
  177.     #define TEXT   FIELD_3_DEFAULT
  178.     #define MAX    FIELD_3_MAX_CHARS
  179.     #define FILTER FIELD_3_FILTER
  180.  
  181.                     FIELD_EDITFIELD,
  182.  
  183. #endif
  184.  
  185.  
  186.  
  187. /* Field 4 */
  188.  
  189. #if ENTRY_COUNT < 4
  190.  
  191.     #define CAPTION_STYLE     2001
  192.     #define SEPARATOR_EXTRA   18
  193.     #define FIELD_4_MAX_CHARS 0
  194.     #define FIELD_4_FILTER    noFilter
  195. #endif
  196.  
  197. #if FIELD_COUNT > 3
  198.  
  199.     #define ID   4
  200.     #define X    10
  201.     #define Y    (151 + SEPARATOR_EXTRA)
  202.     #define TEXT FIELD_4_TITLE
  203.  
  204.             FIELD_CAPTION,
  205.  
  206.     #define X      104
  207.     #define Y      (146 + SEPARATOR_EXTRA)
  208.     #define TEXT   FIELD_4_DEFAULT
  209.     #define MAX    FIELD_4_MAX_CHARS
  210.     #define FILTER FIELD_4_FILTER
  211.  
  212.                     FIELD_EDITFIELD,
  213.  
  214. #endif
  215.  
  216.  
  217.  
  218. /* Field 5 */
  219.  
  220. #if ENTRY_COUNT < 5
  221.  
  222.     #define CAPTION_STYLE     2001
  223.     #define SEPARATOR_EXTRA   18
  224.     #define FIELD_5_MAX_CHARS 0
  225.     #define FIELD_5_FILTER    noFilter
  226. #endif
  227.  
  228. #if FIELD_COUNT > 4
  229.  
  230.     #define ID   5
  231.     #define X    10
  232.     #define Y    (180 + SEPARATOR_EXTRA)
  233.     #define TEXT FIELD_5_TITLE
  234.  
  235.             FIELD_CAPTION,
  236.  
  237.     #define X      104
  238.     #define Y      (175 + SEPARATOR_EXTRA)
  239.     #define TEXT   FIELD_5_DEFAULT
  240.     #define MAX    FIELD_5_MAX_CHARS
  241.     #define FILTER FIELD_5_FILTER
  242.  
  243.                     FIELD_EDITFIELD,
  244.  
  245. #endif
  246.  
  247.                 // END tab group --------
  248.                 EndSubs {},
  249.                 
  250.                 
  251. /* Separator */
  252.  
  253. #define X 10
  254. #define Y (66 + 29 * ENTRY_COUNT)
  255.  
  256.                 SEPARATOR,
  257.  
  258.  
  259.                 ObjectData { GAPushButton {
  260.                         300000,
  261.                         {112, 18},
  262.                         visible, enabled,
  263.                         bound, bound, unbound, unbound,
  264.                         84, 236,
  265.                         0, defaultSuperView,
  266.                         300000,
  267.                         2002, "About this Plugin",
  268.                         0
  269.                 } },
  270.         EndSubs {}
  271.     }
  272. };
  273.  
  274.  
  275. /* Generate the rest */
  276.  
  277. resource 'RidL' (1000) {
  278.     {    /* array ResourceIDList: 1 elements */
  279.         /* [1] */
  280.         300000
  281.     }
  282. };
  283.  
  284. resource 'Txtr' (2000, "System Font", purgeable) {
  285.     defaultSize,
  286.     0,
  287.     flushDefault,
  288.     srcOr,
  289.     0,
  290.     0,
  291.     0,
  292.     0,
  293.     ""
  294. };
  295.  
  296. resource 'Txtr' (2001, "Geneva 9", purgeable) {
  297.     9,
  298.     0,
  299.     flushDefault,
  300.     srcOr,
  301.     0,
  302.     0,
  303.     0,
  304.     useName,
  305.     "Geneva"
  306. };
  307.  
  308. resource 'Txtr' (2002, "Geneva 9 bold", purgeable) {
  309.     9,
  310.     1,
  311.     flushDefault,
  312.     srcOr,
  313.     0,
  314.     0,
  315.     0,
  316.     useName,
  317.     "Geneva"
  318. };
  319.  
  320. resource 'Txtr' (2003, "Geneva 9 centered", purgeable) {
  321.     9,
  322.     0,
  323.     center,
  324.     srcOr,
  325.     0,
  326.     0,
  327.     0,
  328.     useName,
  329.     "Geneva"
  330. };
  331.  
  332. resource 'Txtr' (2004, "Geneva 9 bold centered", purgeable) {
  333.     9,
  334.     1,
  335.     center,
  336.     srcOr,
  337.     0,
  338.     0,
  339.     0,
  340.     useName,
  341.     "Geneva"
  342. };
  343.